package lrg10002.plugins.akperms.api;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;

public class Tag {

	private Tag parent;
	private List<Tag> children = new ArrayList<Tag>();

	public Tag getParent() {
		return parent;
	}

	public void setParent(Tag parent) {
		this.parent = parent;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public HashMap<String, String> getAttributes() {
		return attributes;
	}

	public String getAttribute(String name) {
		return attributes.get(name);
	}
	
	public void setAttribute(String key, String value) {
		attributes.put(key, value);
	}
	
	public List<Tag> getChildren() {
		return children;
	}
	
	public void addChild(Tag t) {
		children.add(t);
	}

	private HashMap<String, String> attributes = new HashMap<String, String>();

	private String name;

}
